package org.jeecg.modules.product.test;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Scanner;

public class realizeClass {
    public static void main(String[] args) {
        System.out.println("hello world");
        new Dog("a").makeSound();
        new Dog("b").eat();

        Animal animal = new Dog("c");
        animal.eat();
        Dog dog = new Dog("d");
        dog.eat();

        // 获取枚举常量
        Day today = Day.MONDAY;

        // 访问枚举常量的属性
        System.out.println("今天是: " + today.getChineseName());

        /*Optional的用法*/
        Optional<String> optional = Optional.of("Hello");
        if (optional.isPresent()) {
            System.out.println("值存在: " + optional.get());
        } else {
            System.out.println("值不存在");
        }

        optional.ifPresent(value -> System.out.println("值存在: " + value)); // 输出: 值存在: Hello

        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        System.out.println("input: " +input);


        String a = "皮皮熊";

        List<String> list = new ArrayList<>();
    }
}
